package golf

import	(
		//"os"
		//"scanner"
	"fmt"
	//"bytes"
	"container/list"
)

type golfLine struct {
	gtoks *list.List
	lnum int
}

func newGolfLine( gtoks *list.List, lnum int ) *golfLine {
	return &golfLine{gtoks:gtoks, lnum:lnum}
}//newGolfLine()

func (gl *golfLine) String() string {

	res := fmt.Sprintf("Line %v: ", gl.lnum)
	var gt *golfToken
	for iter := gl.gtoks.Front(); iter != nil; iter = iter.Next() {
		gt = iter.Value.(*golfToken)
		res += fmt.Sprintf("%v ", gt.ValueString())
	}

	return res
}//String()
